import React, { Component } from 'react';

class Input extends Component {
  static defaultProps = {
    order: 0
  }
  constructor (props) {
    super(props);
    this.state = {
      inputValue: ''
    };
    this.fnChange = this.fnChange.bind(this);
  }
  fnChange (e) {
    this.setState({inputValue: e.target.value});
  }
  render() {
    console.log(`input ${this.props.order} render`);
    return (
      <div>
        <input value={this.state.inputValue} onChange={this.fnChange} type="text"/>
      </div>
    );
  }

}

export default Input;
